We shouldn't do it by assuming the worst, or by being hostile to them right off the bat and thus proving ourselves to be primitive barbarians. I personally believe that most alien species are decent and not malevolent, so we should be open-minded about the matter, but perhaps a little bit of initial caution or skepticism is still in order, while we're finding out just who they are.
Locking them up in a lab to try to analyze their biology, without their consent, would count as being hostile toward them.
Our time with them may be short, so the first thing we should do is ask them questions, to find out more about the universe and our place in it. I wouldn't recommend going straight for the technological or scientific questions, because our technological expertise is already way ahead of our wisdom in applying it.. we don't need more of that imbalance.
The governments of the world shouldn't hide information about alien visitation from the rest of the populace. They probably fear mass panic, and maybe there would be some degree of it, but it's just a stepping stone to another level of growth and knowledge through exposure to a paradigm-shifting truth. Also, I suspect that the government's hiding of this information (it may sound like I'm implying they're doing it now, and I believe they are, but this can be taken as a potential future case anyway) isn't fully rational. I suspect that people in power just tend to fall into roles (everyone falls into roles in all areas of life, just think of the Stanford prison experiment) and that think that it feels cool and powerful, and/or perhaps just fitting for their position, to hide this information, while internally/psychologically exaggerating the need for it, not really realizing that they're doing this.